@extends('layout.index')
@section('title', '套餐内商品添加')
@section('content')
<div class="mws-panel grid_8">
	
    <div class="mws-panel-body no-padding">
    	<form action="/admin/goods/packagegoodsinsert" method='post' class="mws-form " enctype="multipart/form-data">
    	@if (count($errors) >0)
    		<div class='mws-form-message error'>
    			添加失败!
    			<ul>
    				@foreach ($errors->all() as $error)
						<li>{{$error}}</li>
					@endforeach

    			</ul>
    		</div>

    	@endif
    		<div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span>套餐内商品添加</span>
                    </div>

                    <div class="mws-panel-body no-padding">
                      
                            <div class="mws-form-inline">
                                <div class="mws-form-row">
                                    <label class="mws-form-label">选择套餐名</label>
                                    <div class="mws-form-item">
                                       <select class="smallinfo" name="peid">
                                        @foreach($package as $k=>$v)
                                            <option value ="{{$v->id}}">{{$v->tname}}</option>
                                         @endforeach
                                        </select>
                                    </div>
                                </div>
                                <!-- 通过数据库遍历所有商品 -->
                                <div class="mws-form-row">
                                 
                                    <label class="mws-form-label">套餐所属内商品名</label>
                                    <div class="mws-form-item">
                                     
                                        <select class="smallinfo" name="tgsid">
                                        @foreach($goods as $k=>$v)
                                        
                                            <option value ="{{$v->id}}">{{$v->proname}}</option>

                                            <!-- <input type="hidden" value = "{{$v->id}}" name='sgsid'> -->
                                         @endforeach
                                        </select>

                                         
                                    </div>
                                </div>
                                
                            
                
                            {{csrf_field()}}
                            <div class="mws-button-row">

                                <input type="submit" class="btn btn-danger" value="添加">
                                <input type="reset" class="btn " value="重置">
                            </div>
                        </form>
                    </div>      
                </div>
               
@endsection



